public class Node<T>
{
    public Node<T> next;
    public T data;

    public Node(Node<T> next, T data)
    {
        this.next = next;
        this.data = data;
    }

    public Node()
    {
        this(null,null);
    }

    public String toString()
    {
        return this.data.toString();
    }
}
